package LuoGu;

import java.io.*;
import java.io.IOException;
import java.util.Arrays;
import java.util.Comparator;

public class P13092 {
    static Integer[] a, loser, wins, w, s;

    public static boolean cmp(int x, int y) {
        if (s[x].equals(s[y])) return x < y;
        return s[y].compareTo(s[x]) < 0;
    }

    public static void merge() {
        int i = 1, j = 1;
        a[0] = 0;
        while (i <= wins[0] && j <= loser[0]) {
            if(cmp(wins[i],loser[j])){
                a[++a[0]] = wins[i++];
            }else{
                a[++a[0]] = loser[j++];
            }
        }
        while(i<=wins[0]){
            a[++a[0]] = wins[i++];
        }
        while(j <= loser[0]){
            a[++a[0]] = loser[j++];
        }
    }

    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        int N = 0, R = 0, Q = 0;
        String tmp = br.readLine();
        N = Integer.parseInt(tmp.split(" ")[0]);
        R = Integer.parseInt(tmp.split(" ")[1]);
        Q = Integer.parseInt(tmp.split(" ")[2]);
        String str1 = br.readLine();
        String str2 = br.readLine();
        String[] pal1 = str1.split(" ");
        String[] pal2 = str2.split(" ");
        N *= 2;
        w = new Integer[N + 1];
        loser = new Integer[N + 1];
        wins = new Integer[N + 1];
        s = new Integer[N + 1];
        a = new Integer[N + 1];
        s[0] = 0;
        a[0] = 0;
        loser[0] = wins[0] = 0;
        for (int i = 1; i <= N; i++) {
            a[i] = i;
            s[i] = Integer.parseInt(pal1[i - 1]);
            w[i] = Integer.parseInt(pal2[i - 1]);
        }
        Arrays.sort(a,1,N+1, new Comparator<Integer>() {
            @Override
            public int compare(Integer o1, Integer o2) {
                if(s[o1].equals(s[o2])) return o1-o2;
                return s[o2].compareTo(s[o1]);
            }
        });
        for (int i = 1; i <= R; i++) {
            a[0] = 0;
            loser[0] = wins[0] = 0;
            for (int j = 1; j <= N; j += 2) {
                if (w[a[j]] > w[a[j + 1]]) {
                    s[a[j]]++;
                    wins[++wins[0]] = a[j];
                    loser[++loser[0]] = a[j + 1];
                } else {
                    s[a[j + 1]]++;
                    wins[++wins[0]] = a[j + 1];
                    loser[++loser[0]] = a[j];
                }
                merge();
            }
        }
        System.out.print(a[Q]);
    }
}
